Developer Documentation
PATH  WebObjects 4.5 Documentation > Getting Started With Direct to Java Client

   

Freezing XML

Recall that the client side controller factory generates the user interface for a window at a time. To create a window, the controller factory makes a rule system request, specifying the window's task (form, query, or select), the window type (window or modal dialog), and the entity (if required by the task). The rule system fires a rule that outputs a D2WComponent, which in turn provides XML that describes the controller hierarchy for the current window.

By default, the rule system returns a D2WComponent that generates the XML dynamically. However, you can create a custom D2WComponent that returns static or frozenXML. This is called "freezing XML".

The basic steps for freezing XML for a particular window are:

  1. Create a D2WComponent to supply the frozen XML.

  2. Use the Assistant to dynamically generate the XML and then save it to a file.

  3. Copy the frozen XML and paste it into your D2WComponent's .html file.

  4. Modify the XML file to specify the customizations you want.

  5. Write a rule that uses your D2WComponent to supply the frozen XML.

The most common reason to freeze XML is to specify a custom user interface layout that is difficult or impossible to express with rules. For example, suppose that you want to modify the select Studio dialog to put the name query text field in a box. This is very easy to specify using frozen XML. The procedure is described in the following sections.

Creating a D2WComponent

Getting the Default XML

Modifying the XML

Writing a Custom Rule to Use Your Component


© 1999 Apple Computer, Inc. – (Draft. Last updated 05 Jan 00)